package com.xmy.cultivate.listeners;

import com.xmy.cultivate.constants.MqConstants;
import com.xmy.cultivate.entity.views.StudentAllotTier;
import com.xmy.cultivate.service.IStudentAllotTierService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.core.ExchangeTypes;
import org.springframework.amqp.rabbit.annotation.Exchange;
import org.springframework.amqp.rabbit.annotation.Queue;
import org.springframework.amqp.rabbit.annotation.QueueBinding;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * 学生班级分层
 */
@Slf4j
@Component
public class StudentAllotTierListener {


    @Autowired
    IStudentAllotTierService iStudentAllotTierService;

    /**
     * 分层数据添加
     * @param studentAllotTier
     */
//    @RabbitListener(bindings = @QueueBinding(
//            value = @Queue(name = MqConstants.QUEUE_ERP_STUDENT_ALLOT_TIER_Q1, durable = "true"),
//            exchange = @Exchange(name = MqConstants.EXCHANGE_ERP_STUDENT_ALLOT_TIER_FANOUT, type = ExchangeTypes.FANOUT)
//    ))
//    public void studentAllotTier(StudentAllotTier studentAllotTier){
//        iStudentAllotTierService.studentClassTypeAdd(studentAllotTier);
//    }
}
